//评价模型
const mongoose = require("mongoose");
const reviewsSchema = new mongoose.Schema({
	orderid: {
		type: mongoose.Schema.Types.ObjectId,
		ref: "orderModel",
	}, //关联车id
	userid: {
		type: mongoose.Schema.Types.ObjectId,
		ref: "userModel",
	},
	content: String, //内容
	createtime: String, //创建时间
});

//建立模型，第一个参数为模型名字可以任意取，第三个参数为mongodb数据库里实际那个数据集合的名字
mongoose.model("reviewsModel", reviewsSchema, "reviews");
